Skip to content

Feat/issue 19 course wishlist - #33

Merged
udaycodespace merged 2 commits into
udaycodespace:mainfrom
Jidnyasa-P:feat/issue-19-course-wishlist
Jul 24, 2026
Merged

Feat/issue 19 course wishlist#33
udaycodespace merged 2 commits into
udaycodespace:mainfrom
Jidnyasa-P:feat/issue-19-course-wishlist

Conversation

@Jidnyasa-P

@Jidnyasa-P Jidnyasa-P commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a persistent per-student course bookmark and wishlist system with shared frontend state, optimistic updates, filtering, sorting, navigation counts, and safe handling of unavailable courses.

Fixes #19

Backend changes

  • Added a dedicated course-bookmark Mongoose model

  • Added a compound unique index on user ID and course ID

  • Added protected student-only bookmark routes

  • Added endpoints to:

    • Save a course
    • Remove a saved course
    • Retrieve saved courses
    • Check bookmark state for multiple courses
    • Clear all saved courses
  • Added duplicate prevention

  • Added pagination

  • Added course, category, and educator search

  • Added category filtering

  • Added free and paid filtering

  • Added available and deleted-course filtering

  • Added recently saved, title, and price sorting

  • Added safe handling for courses removed after being bookmarked

Frontend changes

  • Added a shared BookmarksProvider
  • Added reusable BookmarkButton
  • Added a responsive Saved Courses page
  • Added a reusable navigation link with live bookmark count
  • Added optimistic save/remove updates
  • Added rollback when an API request fails
  • Added cross-page bookmark synchronization
  • Added search, filters, sorting, pagination, loading, empty, and error states
  • Added responsive desktop, tablet, and mobile layouts
  • Added keyboard-accessible bookmark controls

Persistence and synchronization

Bookmark data is stored per authenticated student in MongoDB.

Bookmark state remains synchronized across:

  • Course catalog cards
  • Course content/detail pages
  • Saved Courses page
  • Navigation count

The state also reloads correctly after a page refresh.

Validation

  • Backend syntax checks passed
  • Frontend production build passed
  • Logged-out users are redirected to login
  • Students can save courses
  • Duplicate bookmarks are prevented
  • Students see only their own bookmarks
  • Bookmark state persists after refresh
  • Catalog and course page state remain synchronized
  • Search works
  • Deleted courses are handled safely
  • Loading, empty, and error states work
  • Mobile and keyboard testing completed

Documentation

Added:

docs/course-bookmarks.md

The document covers API endpoints, database rules, frontend integration, optimistic updates, deleted-course handling, and manual testing.

@udaycodespace udaycodespace added ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points and removed frontend documentation backend fullstack database labels Jul 23, 2026
@udaycodespace udaycodespace added ECSoC26 Required label for a PR to be eligible for Sentinel scoring redo Reviewed — needs changes before it can be merged labels Jul 23, 2026
@udaycodespace
udaycodespace self-requested a review July 23, 2026 18:35
@udaycodespace

Copy link
Copy Markdown
Owner

Description

Adds a persistent per-student course bookmark and wishlist system with shared frontend state, optimistic updates, filtering, sorting, navigation counts, and safe handling of unavailable courses.

Fixes #19

Backend changes

  • Added a dedicated course-bookmark Mongoose model

  • Added a compound unique index on user ID and course ID

  • Added protected student-only bookmark routes

  • Added endpoints to:

    • Save a course
    • Remove a saved course
    • Retrieve saved courses
    • Check bookmark state for multiple courses
    • Clear all saved courses
  • Added duplicate prevention

  • Added pagination

  • Added course, category, and educator search

  • Added category filtering

  • Added free and paid filtering

  • Added available and deleted-course filtering

  • Added recently saved, title, and price sorting

  • Added safe handling for courses removed after being bookmarked

Frontend changes

  • Added a shared BookmarksProvider
  • Added reusable BookmarkButton
  • Added a responsive Saved Courses page
  • Added a reusable navigation link with live bookmark count
  • Added optimistic save/remove updates
  • Added rollback when an API request fails
  • Added cross-page bookmark synchronization
  • Added search, filters, sorting, pagination, loading, empty, and error states
  • Added responsive desktop, tablet, and mobile layouts
  • Added keyboard-accessible bookmark controls

Persistence and synchronization

Bookmark data is stored per authenticated student in MongoDB.

Bookmark state remains synchronized across:

  • Course catalog cards
  • Course content/detail pages
  • Saved Courses page
  • Navigation count

The state also reloads correctly after a page refresh.

Validation

  • Backend syntax checks passed
  • Frontend production build passed
  • Logged-out users are redirected to login
  • Students can save courses
  • Duplicate bookmarks are prevented
  • Students see only their own bookmarks
  • Bookmark state persists after refresh
  • Catalog and course page state remain synchronized
  • Optimistic updates roll back on request failure
  • Search works
  • Category filtering works
  • Free and paid filtering works
  • Availability filtering works
  • Recently saved sorting works
  • Title sorting works
  • Price sorting works
  • Pagination works
  • Deleted courses are handled safely
  • Loading, empty, and error states work
  • Mobile and keyboard testing completed

Documentation

Added:

docs/course-bookmarks.md

The document covers API endpoints, database rules, frontend integration, optimistic updates, deleted-course handling, and manual testing.

Please update this PR before review:

  • Complete the validation checklist ([x] for everything you've tested).
  • Attach Before & After UI screenshots/GIFs.
  • Include backend/frontend test logs (build, syntax, etc.) and manual testing evidence.

I'll review the PR after these are added.

@Jidnyasa-P

Copy link
Copy Markdown
Contributor Author

Thanks for the review instructions. I have updated the PR validation checklist and added supporting testing evidence.

Screenshot 2026-07-25 000042 Screenshot 2026-07-25 000209 Screenshot 2026-07-25 000532

@udaycodespace udaycodespace added good-issue PA-awarded bonus for a well-written, well-scoped issue — +10 XP in review PR is up and waiting on maintainer review and removed redo Reviewed — needs changes before it can be merged labels Jul 24, 2026
@udaycodespace
udaycodespace merged commit d6eb25b into udaycodespace:main Jul 24, 2026
2 of 6 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L2 Medium difficulty, auto-assigned by Sentinel — 10 points and removed ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26-L2 Medium difficulty, auto-assigned by Sentinel — 10 points ECSoC26 Required label for a PR to be eligible for Sentinel scoring good-issue PA-awarded bonus for a well-written, well-scoped issue — +10 XP in review PR is up and waiting on maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add persistent course bookmarks and student wishlist

2 participants